package com.yikes.srb.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.yikes.srb.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 标的出借记录表
 * </p>
 *
 * @author guanrong.yin
 * @since 2024-12-03
 */
@Getter
@Setter
@TableName("lend_item")
@Schema(name = "LendItem对象", description = "标的出借记录表")
public class LendItem extends BaseEntity implements Serializable {

    @Schema(description = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "投资编号")
    @TableField("lend_item_no")
    private String lendItemNo;

    @Schema(description = "标的id")
    @TableField("lend_id")
    private Long lendId;

    @Schema(description = "投资用户id")
    @TableField("invest_user_id")
    private Long investUserId;

    @Schema(description = "投资人名称")
    @TableField("invest_name")
    private String investName;

    @Schema(description = "投资金额")
    @TableField("invest_amount")
    private BigDecimal investAmount;

    @Schema(description = "年化利率")
    @TableField("lend_year_rate")
    private BigDecimal lendYearRate;

    @Schema(description = "投资时间")
    @TableField("invest_time")
    private LocalDateTime investTime;

    @Schema(description = "开始日期")
    @TableField("lend_start_date")
    private LocalDate lendStartDate;

    @Schema(description = "结束日期")
    @TableField("lend_end_date")
    private LocalDate lendEndDate;

    @Schema(description = "预期收益")
    @TableField("expect_amount")
    private BigDecimal expectAmount;

    @Schema(description = "实际收益")
    @TableField("real_amount")
    private BigDecimal realAmount;

    @Schema(description = "状态（0：默认 1：已支付 2：已还款）")
    @TableField("status")
    private Integer status;

}
